﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace DateTimeAccurate
{
    class Program
    {
        static void Main(string[] args)
        {
            DateTimeAccurate.Now.Profile();
            //DateTimeAccurate.Now.StartSynchronize();
            //long ticks = DateTimeAccurate.Now.Ticks;
            //for (int i = 0; i < 1000000000; i++)
            //{
            //    if (ticks != DateTimeAccurate.Now.Ticks)
            //    {
            //        long temp = DateTimeAccurate.Now.Ticks;
            //        double msDelay = ((double)(DateTimeAccurate.Now.Ticks - ticks)) / (double)TimeSpan.TicksPerMillisecond;

            //        if (msDelay > 0.1)
            //        {
            //            Console.WriteLine("Millisecond difference: " + msDelay);
            //            Console.WriteLine("New time:" + new DateTime(temp).ToString("HH:mm:ss.fff"));
            //            Console.WriteLine("Old time:" + new DateTime(ticks).ToString("HH:mm:ss.fff"));
            //        }
            //        ticks = DateTimeAccurate.Now.Ticks;
            //    }
            //    else
            //    {
            //        //Console.WriteLine("same");
            //    }
            //}
            //Console.WriteLine("ended");
            //DateTimeAccurate.Now.StopSynchronize();
        }
    }
}